/*
 * XML Type:  sequence-generator
 * Namespace: http://java.sun.com/xml/ns/persistence/orm
 * Java type: com.googlecode.horncomb.orm.jpa.v10.xmlbeans.SequenceGenerator
 *
 * Automatically generated - do not modify.
 */
package com.googlecode.horncomb.orm.jpa.v10.xmlbeans.impl;
/**
 * An XML sequence-generator(@http://java.sun.com/xml/ns/persistence/orm).
 *
 * This is a complex type.
 */
public class SequenceGeneratorImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.googlecode.horncomb.orm.jpa.v10.xmlbeans.SequenceGenerator
{
    
    /**  */
	private static final long serialVersionUID = -8395944057932998859L;


	public SequenceGeneratorImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName NAME$0 = 
        new javax.xml.namespace.QName("", "name");
    private static final javax.xml.namespace.QName SEQUENCENAME$2 = 
        new javax.xml.namespace.QName("", "sequence-name");
    private static final javax.xml.namespace.QName INITIALVALUE$4 = 
        new javax.xml.namespace.QName("", "initial-value");
    private static final javax.xml.namespace.QName ALLOCATIONSIZE$6 = 
        new javax.xml.namespace.QName("", "allocation-size");
    
    
    /**
     * Gets the "name" attribute
     */
    public java.lang.String getName()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "name" attribute
     */
    public org.apache.xmlbeans.XmlString xgetName()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(NAME$0);
            return target;
        }
    }
    
    /**
     * Sets the "name" attribute
     */
    public void setName(java.lang.String name)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(NAME$0);
            }
            target.setStringValue(name);
        }
    }
    
    /**
     * Sets (as xml) the "name" attribute
     */
    public void xsetName(org.apache.xmlbeans.XmlString name)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(NAME$0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(NAME$0);
            }
            target.set(name);
        }
    }
    
    /**
     * Gets the "sequence-name" attribute
     */
    public java.lang.String getSequenceName()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(SEQUENCENAME$2);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "sequence-name" attribute
     */
    public org.apache.xmlbeans.XmlString xgetSequenceName()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(SEQUENCENAME$2);
            return target;
        }
    }
    
    /**
     * True if has "sequence-name" attribute
     */
    public boolean isSetSequenceName()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(SEQUENCENAME$2) != null;
        }
    }
    
    /**
     * Sets the "sequence-name" attribute
     */
    public void setSequenceName(java.lang.String sequenceName)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(SEQUENCENAME$2);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(SEQUENCENAME$2);
            }
            target.setStringValue(sequenceName);
        }
    }
    
    /**
     * Sets (as xml) the "sequence-name" attribute
     */
    public void xsetSequenceName(org.apache.xmlbeans.XmlString sequenceName)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(SEQUENCENAME$2);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(SEQUENCENAME$2);
            }
            target.set(sequenceName);
        }
    }
    
    /**
     * Unsets the "sequence-name" attribute
     */
    public void unsetSequenceName()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(SEQUENCENAME$2);
        }
    }
    
    /**
     * Gets the "initial-value" attribute
     */
    public int getInitialValue()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(INITIALVALUE$4);
            if (target == null)
            {
                return 0;
            }
            return target.getIntValue();
        }
    }
    
    /**
     * Gets (as xml) the "initial-value" attribute
     */
    public org.apache.xmlbeans.XmlInt xgetInitialValue()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlInt target = null;
            target = (org.apache.xmlbeans.XmlInt)get_store().find_attribute_user(INITIALVALUE$4);
            return target;
        }
    }
    
    /**
     * True if has "initial-value" attribute
     */
    public boolean isSetInitialValue()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(INITIALVALUE$4) != null;
        }
    }
    
    /**
     * Sets the "initial-value" attribute
     */
    public void setInitialValue(int initialValue)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(INITIALVALUE$4);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(INITIALVALUE$4);
            }
            target.setIntValue(initialValue);
        }
    }
    
    /**
     * Sets (as xml) the "initial-value" attribute
     */
    public void xsetInitialValue(org.apache.xmlbeans.XmlInt initialValue)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlInt target = null;
            target = (org.apache.xmlbeans.XmlInt)get_store().find_attribute_user(INITIALVALUE$4);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlInt)get_store().add_attribute_user(INITIALVALUE$4);
            }
            target.set(initialValue);
        }
    }
    
    /**
     * Unsets the "initial-value" attribute
     */
    public void unsetInitialValue()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(INITIALVALUE$4);
        }
    }
    
    /**
     * Gets the "allocation-size" attribute
     */
    public int getAllocationSize()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ALLOCATIONSIZE$6);
            if (target == null)
            {
                return 0;
            }
            return target.getIntValue();
        }
    }
    
    /**
     * Gets (as xml) the "allocation-size" attribute
     */
    public org.apache.xmlbeans.XmlInt xgetAllocationSize()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlInt target = null;
            target = (org.apache.xmlbeans.XmlInt)get_store().find_attribute_user(ALLOCATIONSIZE$6);
            return target;
        }
    }
    
    /**
     * True if has "allocation-size" attribute
     */
    public boolean isSetAllocationSize()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(ALLOCATIONSIZE$6) != null;
        }
    }
    
    /**
     * Sets the "allocation-size" attribute
     */
    public void setAllocationSize(int allocationSize)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ALLOCATIONSIZE$6);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(ALLOCATIONSIZE$6);
            }
            target.setIntValue(allocationSize);
        }
    }
    
    /**
     * Sets (as xml) the "allocation-size" attribute
     */
    public void xsetAllocationSize(org.apache.xmlbeans.XmlInt allocationSize)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlInt target = null;
            target = (org.apache.xmlbeans.XmlInt)get_store().find_attribute_user(ALLOCATIONSIZE$6);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlInt)get_store().add_attribute_user(ALLOCATIONSIZE$6);
            }
            target.set(allocationSize);
        }
    }
    
    /**
     * Unsets the "allocation-size" attribute
     */
    public void unsetAllocationSize()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(ALLOCATIONSIZE$6);
        }
    }
}
